package com.zmn.plat.persistence.interfaces.news;

import com.zmn.common.dto.StatusDTO;
import com.zmn.plat.model.entity.news.News;
import com.zmn.plat.model.entity.news.NewsQuery;

import java.util.List;

/**
 * @author nowind
 * @since 17/3/27 16:21
 */
public interface NewsDao {

    News findByKey(Integer newsId);

    List<News> listPageByQuery(NewsQuery query);

    List<News> listByQuery(NewsQuery query);

    Integer countByQuery(NewsQuery query);


    Integer updateByKey(News news);

    Integer updateStatus(News news);
    Integer updateStatusBatch(StatusDTO dto);

    Integer updateSort(News news);

    Integer updateImgSrc(News news);


    Integer insert(News news);


    Integer deleteByKey(Integer newsId);

}
